package huhx.linux.com.kotlinlearn.common;

import huhx.linux.com.kotlinlearn.model.User;


public class UserManager {

    private static UserManager manager;
    public static boolean isLogin;
    private static User user;

    public static UserManager getInstance() {
        if (manager == null) {
            manager = new UserManager();
        }
        return manager;
    }

    /**
     * 登录对象
     *
     * @param users
     */
    public static void setUser(User users) {
        user = users;
        isLogin = true;
    }

    public static User getUser() {
        return user;
    }

    /**
     * 获取登录状态
     */
    public static boolean getLoginStatus() {
        return isLogin;
    }

}
